package com.study.studyfive.schedule;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author zhangwei
 * @version 1.0
 * @date 2023/10/1 15:45
 */
@Slf4j
@Component
public class ScheduledTest {

    //@Scheduled(cron = "*/2 * * * * ?")
    public void index() {
       // log.info("定时任务1，2秒执行一次，time：" + LocalDateTime.now() + " 线程：" + Thread.currentThread().getName());
    }
}
